The land area that now makes up Finland was settled immediately after the Ice Age, beginning from around 8500 BC. Finland was part of Kingdom of Sweden from the 13th century to 1809 when it was ceded to Russia and became the autonomous Grand Duchy of Finland. In 1917 Finland declared independence. A civil war ensued between the socialist "Reds" and conservative "Whites" of which the latter gained the upper hand. During the Second World War Finland fought twice against the Soviet Union and had to cede most of Karelia to the U.S.S.R but remained an independent democracy. During the Cold War Finland's politics were influenced by the Soviet Union (see: YYA Treaty and finlandization) but the country never became a satellite state. Finland joined the European Union in 1995.